- -allowDuplicateName (C)
- This allows you to create objects with duplicated names. Use
this option only if you do not intend to reference the object. A
typical use of this option could be in a menu routine where references
to the separators are not needed. Referencing an object with
duplicated names is undefined and not supported.
- -autoLock list of callback procedure names (C)
- Used to lock the server process before calling a callback. The
server will lock itself (that is, not accept any more input) before
calling any of the callbacks specified in the list. The lock is
exactly the same as calling VtLock. The programmer
must remember to unlock the application by calling VtUnLock.
For example:
proc lockCB {cbs} {
sleep 5
VtUnLock
}
.
.
.
set ap [VtOpen Lock]
set dlog [VtFormDialog $ap.form ]
VtPushButton $dlog.Lock \
-callback lockCB \
-autoLock lockCB
VtShow $dlog
VtMainLoop
autoLock is typically used in cases where you are
changing the current form and you do not want the user to be able to
access the form while those changes are being made (for example, if
you are stippling fields in the current form).
- -background (CS)
- Sets the background color of the widget to one of the symbolic
color names defined in the IXI Visual Tcl application resource file.
Pre-defined symbols are:
- urgentColor
- highlightColor
- foregroundolor
- backgroundColor
- altBackgroundColor
- -baseLineList (G)
- Gets the list of baseLines for a widget. In character mode this
always returns 0. The baseline is the distance from the top of the
widget to the baseline of the font for the text within the widget.
- -borderWidth integer (CS)
- Sets the width of the border in pixels. In character mode, if
the borderWidth is 0 the border is turned off, if 1 the border is
single-lined, if > 1 then the border is double-lined.
- -errorCallback cmd (C)
- Sets command cmd as the handler to be called when an
error occurs in a callback. When an error occurs IXI Visual Tcl will go
up the object tree until it finds an errorCallback to handle the
error.
Additional callback keys:
- result
- Tcl return string
- callback
- Callback that encountered the error
- returnCode
- Tcl return code
- -font string (CS)
- Sets the fontList of an object to symbolic font names defined in the
Visual Tcl application resource file. Pre-defined symbols are:
smallPlainFont
smallBoldFont
smallItalicFont
medPlainFont
medBoldFont
medItalicFont
largePlainFont
largeBoldFont
largeItalicFont
monoNormalFont
monoBoldFont
monoItalicFont
For example:
VtPushButton $parent.button \
-font largePlainFont
- -foreground (CS)
- Sets the foreground color of the widget to one of the symbolic
color names defined in the IXI Visual Tcl application resource file.
Pre-defined symbols are:
- urgentColor
- highlightColor
- foregroundColor
- backgroundColor
- altBackgroundColor
- -helpCallback cmd (C)
- Sets the help callback for an object. This callback is called
when the <F1> key is pressed over the object. The callback
structure returns a keyed list.
Additional callback keys:
- tree
- Widget Tree token (used by help system)
- -height integer (CSG)
- Sets the height of the object. In graphical mode,
integer is the height in pixels. In character mode,
integer sets the height of the object. Note that widget must
be managed before this value can be retrieved with VtGetValues. (If the object has
-rows as an option, this may be a more convenient way
of setting its height.)
- -hidden boolean (C)
- Specifies whether the object is displayed or not displayed after
creation. By default, all non-dialog objects are displayed when
created.
- -sensitive boolean (CSG)
- Determines whether the widget receives input events. If set to
False, the widget will be greyed and will not accept events. The
default is True.
- -shortHelpString string (CS)
- Sets the string that is sent to the short help callback.
- -shortHelpCallback cmd (CS)
- Sets the cmd to call when the mouse button enters or
leaves a widget.
Additional Callback list keys:
- helpString
- shortHelpString set for the widget.
- -width integer (CSG)
- In the graphical environment this sets the width of the widget
in pixels. In character mode it sets the width in characters. Note
that the widget must be managed before this value can be obtained by
VtGetValues.
- -userData string (CSG)
- Sets any string that you want to attach to any widget. (This is
typically used to attach comment information to widgets that can be
retrieved later using VtGetValues.)
See also:
- -xmArgs list_of_string_pairs (CS)
- This is a back end routine for setting Motif resources that have
not been implemented. The Motif resources specified with
xmArgs are passed to the widget creation and
manipulation commands, as described in the Motif Reference
Manual. For example, the following changes the background of the
button to blue and the foreground to red:
VtPushButton $fn.but \
-xmArgs {XmNbackground blue \
XmNforeground red}